import { Entity, PrimaryGeneratedColumn, ManyToOne, CreateDateColumn } from 'typeorm';
import { UserEntity } from 'src/user/entities/user.entity';
import { PostEntity } from 'src/post/entities/post.entity';

@Entity('user_like')
export class UserLikeEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @ManyToOne(() => UserEntity) user: UserEntity;
  @ManyToOne(() => PostEntity) post: PostEntity;

  @CreateDateColumn()
  createdAt: Date;
}
